home *** CD-ROM | disk | FTP | other *** search
- UTILITIES1-SRC
- PRG formatted GEOS file V1.0
- MPS-801+
- UTILITIES1-SRC
- LASTER'S
- ONVERTER
- Write Image V2.0
- geoWrite V2.0
- T-Grab Data V2
- Please Select Option:
- new document
- existing document
- to deskTop
- Insert new disk into disk
- .if (0)
- ***************************************************
- Generic Disk Error Handler
- @Author:
- William C. Coleman
- @Date:
- 22 March 1988
- @Notice:
- Copyright (C) 1988, BlasterSoft, William C. Coleman
- page 1 tables and text strings for DiskError.
- page 2 DiskError
- page 3 HiBeep,LowBeep,Beep
- page 4 ClearScreen
- ***************************************************
- .endif
- .if Pass1
- .noeqin
- .noglbl
- .include geosSym
- .include geosMac
- .eqin
- .glbl
- .endif
- .psect
- @DErr_Box:
- .byte DEF_DB_POS|1
- .byte DBTXTSTR,42,TXT_LN_1_Y
- .word derrtext
- .byte DBVARSTR,TXT_LN_X,TXT_LN_3_Y,r5
- .byte DB_USR_ROUT
- .word HiBeep
- .byte OK,DBI_X_2,DBI_Y_2
- .byte NULL
- @err1:
- .byte "Not Enough Blocks",NULL
- @err2:
- .byte "Invalid Track",NULL
- @err3:
- .byte "Insufficient Space",NULL
- @err4:
- .byte "Directory is Full",NULL
- @err5:
- .byte "File Not Found",NULL
- @err6:
- .byte "Bad BAM in Drive",NULL
- @err7:
- .byte "Can't Organize a REU",NULL ;Should be UNOPEN_VLIR_FILE
- @err10:
- .byte "Geos Structure Mismatch",NULL
- @err11:
- .byte "Buffer OverFlow",NULL
- @err12:
- .byte "Directory is Empty",NULL ;Should be CANCEL_ERR
- @err13:
- .byte "Device Not Present",NULL
- @err20:
- .byte "No Header Block",NULL
- @err21:
- .byte "Unformatted or Missing Disk",NULL
- @err22:
- .byte "No Data Block Found",NULL
- @err23:
- .byte "Data Checksum Error",NULL
- @err24:
- .byte "Incompatable Filetypes",NULL
- @err25:
- .byte "Write Verify Error",NULL
- @err26:
- .byte "Write Protect On",NULL
- @err27:
- .byte "Header Checksum Error",NULL
- @err29:
- .byte "Disk ID Mismatch",NULL
- @err73:
- .byte "DOS Mismatch",NULL
- @errxx:
- .byte "Unrecognized Error Code",NULL
- @derrtext:
- .byte BOLDON,"* Disk Error *",NULL
- @errtab:
- .word err1,err2,err3,err4,err5,err6,errxx
- .word errxx,errxx,err10,err11,err12,err13
- @errtabhi:
- .word err20,err21,err22,err23,err24,err25,err26,err27,errxx,err29
- Code",NULL
- @derrtext:
- .byte BOLDON,"* Disk Error *",NULL
- @errtab:
- .word err1,err2,err3,err4,err5,err6,errxx
- .word errxx,errxx,err10,err11,err12,err13
- @errtabhi:
- .word err20,err21,err22,err23,err24,err25,err26,err27,
- ;**************************************************
- @DiskError
- - Opens an OK dialog box to inform user that there
- ; was a disk error.
- @Pass:
- X - error code
- @Return:
- nothing
- ;**************************************************
- @DiskError:
- pha ;Save registers
- txa
- pha
- tya
- pha
- PushW r5
- PushB currentMode
- cpx #$20
- bcs 01$ ;Branch if high error
- dex
- txa
- asl a
- tay
- bra 04$
- @01$:
- cpx #$73 ;This one is not consecutive...
- bne 02$ ;...so we check it by hand
- LoadW r5,err73
- bne 05$ ;Always branches
- @02$:
- cpx #$2a ;Highest error code+1
- bcc 03$
- LoadW r5,errxx ;Unrecognized error
- bne 05$ ;Always branches
- @03$:
- txa ;Do high error group
- sbc #$1f
- asl a
- tay
- @04$:
- lda errtabhi,y
- sta r5L
- lda errtabhi+1,y
- sta r5H
- @05$:
- LoadW r0,DErr_Box
- jsr DoDlgBox
- PopB currentMode
- PopW r5
- pla
- tax
- pla
- tay
- pla
- rts
- @03$:
- txa ;Do high error grou
- ;**************************************************
- @HiBeep, LowBeep
- - Generates a bell-like tone.
- @Pass,Return,Destroyed:
- Nothing
- ;**************************************************
- @LowBeep:
- pha
- txa
- pha
- tya
- pha
- ldx #40
- bne LBP_
- @HiBeep:
- pha
- txa
- pha
- tya
- pha
- ldx #20
- @LBP_:
- jsr Beep
- pla
- tay
- pla
- tax
- pla
- rts
- ;**************************************************
- @Beep
- - Generates a bell-like tone.
- @Pass:
- X - frequency
- @Return:
- Volume left at maximum
- @Destroyed:
- A,X,Y
- ;**************************************************
- @Beep:
- sei
- LoadB CPU_DATA,IO_IN
- stx sidbase+1
- ldy #0
- sty sidbase+5 ;Y will be used in loop
- LoadB sidbase+6,%11111001
- LoadB sidbase+15,55
- LoadB sidbase+24,15
- ldx #%00010101
- stx sidbase+4 ;Gate sound on
- @01$:
- dey
- bne 01$
- dex
- bne 01$
- LoadB sidbase+4,%00010100
- LoadB CPU_DATA,RAM_64K
- cli
- rts
- ;**************************************************
- @ClearScreen
- - Clears the screen *fast* to bg 0
- ;**************************************************
- @ClearScreen:
- LoadW r0,SCREEN_BASE
- LoadW r1,BACK_SCR_BASE
- ldx #$7d
- @01$:
- ldy #$3f
- lda #0
- @02$:
- sta (r0),y
- sta (r1),y
- dey
- bpl 02$
- lda r0L
- add #$40
- sta r0L
- sta r1L
- bcc 03$
- inc r0H
- inc r1H
- @03$:
- dex
- bne 01$
- rts
- ;************************ EOF: UTILITIES
-